<?php

namespace app\index\model;
use think\Db;
use think\Model;
use think\Session;

class Delete extends Model
{

    protected $table = 'S_SampleDetail';

    public  function AletertJymdDyByJymddm_kh($oldjymddm_zx,$jymdmc_zx,$newjymdmc_zx){

    }

    //删除 交接列表
    //查询交接列表
    //select * from S_SampleDetail  a inner join S_SampleItem b on a.id = b.S_SampleId
    //where a.yqdh = '微生物' and b.s_online = '0' order by a.id asc

/*select *  from S_SampleDetail  a left join S_SampleItem b on a.id = b.S_SampleId
where a.yqdh = '7500' and b.s_online = '0' and S_SampleTime < '2021-01-01'

delete from S_SampleDetail where id in( select a.id  from S_SampleDetail  a left join S_SampleItem b on a.id = b.S_SampleId
where a.yqdh = '院感' and b.s_online = '0' and S_SampleTime < '2021-01-20'
)



select a.id  from S_SampleDetail  a left join S_SampleItem b on a.id = b.S_SampleId
where a.yqdh = '微量元素' and b.s_online = '0' order by a.id asc

delete from S_SampleDetail where id in( select a.id  from S_SampleDetail  a left join S_SampleItem b on a.id = b.S_SampleId
where a.yqdh = '微量元素' and b.s_online = '0'   and S_SampleTime < '2021-01-20'
)

SELECT * FROM dbo.t_lis_tasks where ybid = '61B027002145'

--待交接界面


delete FROM dbo.t_lis_tasks where zt = '0'  and mddes = '微量元素六项'  and ybid like '673034%'

delete from dbo.t_lis_tasks where zt = '0' and gcode = '26'


and djsj <  '2021-01-01 00:00:00.000'*/
    public function DeleteSampleByDatetimeOrYqdh(){

    }
}